﻿.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Desktop table */
#orderTable {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

    #orderTable th,
    #orderTable td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    #orderTable th {
        background: #f7f7f7;
        font-weight: 700;
    }

.btn {
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: #fff;
    cursor: pointer;
    margin: 2px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

    .badge.success {
        background: #d1fae5;
        color: #047857;
    }

    .badge.pending {
        background: #fef3c7;
        color: #92400e;
    }

    .badge.failed {
        background: #fee2e2;
        color: #b91c1c;
    }

    .badge.created {
        background: #e0e7ff;
        color: #3730a3;
    }


/* Mobile first card view */
@media (max-width: 768px) {

    .table-wrapper {
        overflow-x: hidden;
    }

    #orderTable,
    #orderTable thead,
    #orderTable tbody,
    #orderTable th,
    #orderTable td,
    #orderTable tr {
        display: block;
        width: 100%;
    }

        #orderTable thead {
            display: none;
        }

        #orderTable tr {
            background: #fff;
            margin-bottom: 14px;
            padding: 14px;
            border-radius: 16px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.08);
            border: 1px solid #eee;
        }

        #orderTable td {
            border: none;
            padding: 9px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            font-size: 14px;
        }

            #orderTable td::before {
                content: attr(data-label);
                font-weight: 700;
                color: #555;
                min-width: 90px;
            }

            #orderTable td:last-child {
                justify-content: flex-start;
                gap: 8px;
                flex-wrap: wrap;
                padding-top: 12px;
                border-top: 1px dashed #ddd;
            }

                #orderTable td:last-child::before {
                    content: "Action";
                    width: 100%;
                    margin-bottom: 4px;
                }

    .btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 12px;
        border-radius: 12px;
    }
}
